home *** CD-ROM | disk | FTP | other *** search
/ 130 MIDI Tool Box / 130 MIDI Tool Box.iso / pc800 / pc802.c < prev    next >
Text File  |  1987-08-31  |  2KB  |  71 lines

  1. #include<stdarg.h>
  2. #include<stdio.h>
  3. #include<stdlib.h>
  4.  
  5. #include<dos.h>
  6.  
  7. /* cursor module */
  8.  
  9. int curs_data[60]={
  10.   11,12,13,14,15,
  11.   16,17,18,19,20,
  12.   21,22,0,0,0,
  13.   26,27,0,0,0,
  14.   28,29,30,31,32,
  15.   33,34,35,36,37,
  16.   38,39,40,0,0,
  17.   41,42,58,0,0,
  18.   43,0,0,0,0,
  19.   44,45,46,0,0,
  20.   47,48,49,50,51,
  21.   52,53,54,55,56
  22.   };
  23.  
  24. extern int current_parm,cur_curs;
  25. extern int parm_x[],parm_y[];
  26. /*------------------------------------------------------------------*/
  27. parm_right()
  28. {
  29.  ++cur_curs;
  30.  chk_curs();
  31.  while (curs_data[cur_curs]==0)  ++cur_curs; chk_curs();
  32.  mov_curs();
  33. }
  34. /*------------------------------------------------------------------*/
  35. parm_left()
  36. {
  37.  --cur_curs;
  38.  chk_curs();
  39.  while (curs_data[cur_curs]==0) --cur_curs; chk_curs();
  40.  mov_curs();
  41. }
  42. /*------------------------------------------------------------------*/
  43. parm_up()
  44. {
  45.  cur_curs-=5;
  46.  chk_curs();
  47.  while (curs_data[cur_curs]==0) --cur_curs; chk_curs();
  48.  mov_curs();
  49. }
  50. /*------------------------------------------------------------------*/
  51. parm_down()
  52. {
  53.  cur_curs+=5;
  54.  chk_curs();
  55.  while (curs_data[cur_curs]==0) --cur_curs; chk_curs();
  56.  mov_curs();
  57. }
  58. /*------------------------------------------------------------------*/
  59. chk_curs()
  60. {
  61.   if (cur_curs>59) cur_curs-=60;
  62.   if (cur_curs<0)  cur_curs+=60;
  63. }
  64. /*------------------------------------------------------------------*/
  65.  mov_curs()
  66. {
  67.   current_parm=curs_data[cur_curs];
  68.   gotoxy(parm_x[current_parm],parm_y[current_parm]);
  69. }
  70. /*------------------------------------------------------------------*/
  71.